package com.service.bbdy;

import java.util.Vector;

import com.bpms.common.CommonUtil;
import com.bpms.common.JdbcWorker;
import com.bpms.common.VO;
import com.bpms.common.VOList;
import com.bpms.esb.IService;

public class Sumatmlog implements IService {
	public VO exec(VO arg0) {
		JdbcWorker j = null;
		VO vo = new VO();
		try {
			j = new JdbcWorker();
			String date = arg0.getAttr("date");//日期
			String sql1= "select a.trantype, count(trantype) as count from cm_djb a where a.createdate = '" + date +"' group by a.trantype";
			VOList volist = j.readAll(new VO(), sql1.toString());
			Vector<VO> vector = volist.listData;
			for (VO v2 : vector) {
				String trantype = v2.getAttr("trantype");
				String count = v2.getAttr("count");
				vo.setAttr("count" + trantype,count);
			}
			vo.setAttr("result", "0000");
		} catch (Exception e) {
			CommonUtil.debug("获取ATM日志统计失败", e);
			vo.setAttr("result", "9999");
		}
		return vo;
	}

}
